/*******************************************************************************
 * Size: 22 px
 * Bpp: 4
 * Opts: 
 ******************************************************************************/

#ifdef LV_LVGL_H_INCLUDE_SIMPLE
#include "lvgl.h"
#else
#include "lvgl/lvgl.h"
#endif

#ifndef MUYU_APP_FONT_22
#define MUYU_APP_FONT_22 1
#endif

#if MUYU_APP_FONT_22

/*-----------------
 *    BITMAPS
 *----------------*/

/*Store the image of the glyphs*/
static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = {
    /* U+002B "+" */
    0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x8,
    0xf7, 0x0, 0x0, 0x0, 0x0, 0x8f, 0x70, 0x0,
    0x0, 0x0, 0x8, 0xf7, 0x0, 0x0, 0x1, 0x11,
    0x8f, 0x71, 0x11, 0x5, 0xff, 0xff, 0xff, 0xff,
    0xf4, 0x5f, 0xff, 0xff, 0xff, 0xff, 0x40, 0x0,
    0x8, 0xf7, 0x0, 0x0, 0x0, 0x0, 0x8f, 0x70,
    0x0, 0x0, 0x0, 0x8, 0xf7, 0x0, 0x0, 0x0,
    0x0, 0x8f, 0x70, 0x0, 0x0,

    /* U+0031 "1" */
    0x0, 0x1, 0x9f, 0xd0, 0x7, 0xff, 0xfd, 0xd,
    0xff, 0xff, 0xd1, 0xfe, 0x77, 0xfd, 0x19, 0x10,
    0x7f, 0xd0, 0x0, 0x7, 0xfd, 0x0, 0x0, 0x7f,
    0xd0, 0x0, 0x7, 0xfd, 0x0, 0x0, 0x7f, 0xd0,
    0x0, 0x7, 0xfd, 0x0, 0x0, 0x7f, 0xd0, 0x0,
    0x7, 0xfd, 0x0, 0x0, 0x7f, 0xd0, 0x0, 0x7,
    0xfd, 0x0, 0x0, 0x7f, 0xd0, 0x0, 0x7, 0xfd,
    0x0, 0x0, 0x7f, 0xd0,

    /* U+529F "功" */
    0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x62, 0x0,
    0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x9,
    0xf7, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
    0x0, 0x9, 0xf7, 0x0, 0x0, 0x0, 0xb, 0xee,
    0xee, 0xee, 0xc0, 0x9, 0xf7, 0x0, 0x0, 0x0,
    0xc, 0xff, 0xff, 0xff, 0xe0, 0x9, 0xf7, 0x0,
    0x0, 0x0, 0x0, 0x0, 0xef, 0x20, 0x4f, 0xff,
    0xff, 0xff, 0xff, 0xf7, 0x0, 0x0, 0xef, 0x20,
    0x3e, 0xef, 0xff, 0xee, 0xef, 0xf7, 0x0, 0x0,
    0xef, 0x20, 0x0, 0xb, 0xf5, 0x0, 0xa, 0xf7,
    0x0, 0x0, 0xef, 0x20, 0x0, 0xc, 0xf4, 0x0,
    0xa, 0xf6, 0x0, 0x0, 0xef, 0x20, 0x0, 0xd,
    0xf3, 0x0, 0xb, 0xf6, 0x0, 0x0, 0xef, 0x20,
    0x0, 0xf, 0xf1, 0x0, 0xb, 0xf6, 0x0, 0x0,
    0xef, 0x20, 0x0, 0x1f, 0xf0, 0x0, 0xb, 0xf5,
    0x0, 0x0, 0xef, 0x20, 0x0, 0x4f, 0xd0, 0x0,
    0xc, 0xf4, 0x0, 0x0, 0xef, 0x69, 0xe0, 0x8f,
    0xa0, 0x0, 0xd, 0xf4, 0x1, 0x48, 0xff, 0xff,
    0xf3, 0xdf, 0x50, 0x0, 0xe, 0xf3, 0x3f, 0xff,
    0xff, 0xc7, 0x25, 0xff, 0x0, 0x0, 0xf, 0xf2,
    0xe, 0xc8, 0x40, 0x0, 0x1e, 0xf8, 0x0, 0x0,
    0xf, 0xf1, 0x0, 0x0, 0x0, 0x0, 0xcf, 0xd0,
    0x2, 0x22, 0x8f, 0xf0, 0x0, 0x0, 0x0, 0xc,
    0xff, 0x30, 0x1f, 0xff, 0xff, 0xa0, 0x0, 0x0,
    0x0, 0x6f, 0xf5, 0x0, 0xe, 0xfe, 0xc8, 0x0,
    0x0, 0x0, 0x0, 0x5, 0x40, 0x0, 0x0, 0x0,
    0x0, 0x0,

    /* U+5FB7 "德" */
    0x0, 0x0, 0xb, 0x40, 0x0, 0x0, 0x5e, 0x70,
    0x0, 0x0, 0x0, 0x0, 0x0, 0x8f, 0xe0, 0x0,
    0x0, 0x6f, 0x80, 0x0, 0x0, 0x0, 0x0, 0x4,
    0xff, 0x4f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
    0x90, 0x0, 0x2e, 0xf8, 0xa, 0xaa, 0xaa, 0xcf,
    0xda, 0xaa, 0xaa, 0x60, 0x1, 0xdf, 0xb0, 0x0,
    0x0, 0x0, 0x6f, 0x80, 0x0, 0x0, 0x0, 0x1c,
    0xfd, 0x12, 0x9, 0xff, 0xff, 0xff, 0xff, 0xff,
    0xfd, 0x0, 0x1d, 0xd1, 0x3f, 0x8a, 0xf8, 0x8f,
    0xc8, 0xcf, 0x88, 0xfd, 0x0, 0x1, 0x20, 0xbf,
    0x6a, 0xf0, 0xf, 0x90, 0x8f, 0x10, 0xed, 0x0,
    0x0, 0x5, 0xfd, 0xa, 0xf0, 0xf, 0x90, 0x8f,
    0x10, 0xed, 0x0, 0x0, 0x1e, 0xf4, 0xa, 0xff,
    0xff, 0xff, 0xff, 0xff, 0xfd, 0x0, 0x0, 0xbf,
    0xf1, 0x5, 0x88, 0x88, 0x88, 0x88, 0x88, 0x86,
    0x0, 0x7, 0xff, 0xf1, 0x0, 0x0, 0x0, 0x0,
    0x0, 0x0, 0x0, 0x0, 0x5f, 0xfe, 0xf1, 0x7f,
    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x1b,
    0x3c, 0xf1, 0x49, 0x99, 0x99, 0xaf, 0x99, 0x99,
    0x99, 0x80, 0x0, 0xc, 0xf1, 0x6, 0x95, 0xb4,
    0x8f, 0x90, 0x6, 0xb0, 0x0, 0x0, 0xc, 0xf1,
    0xd, 0xf5, 0xf6, 0xc, 0xf5, 0x8, 0xf9, 0x0,
    0x0, 0xc, 0xf1, 0x5f, 0xa4, 0xf6, 0x2, 0xa4,
    0x72, 0xdf, 0x40, 0x0, 0xc, 0xf2, 0xef, 0x34,
    0xf7, 0x0, 0x7, 0xf4, 0x4f, 0xe0, 0x0, 0xc,
    0xf7, 0xfa, 0x4, 0xfe, 0x88, 0x9e, 0xf1, 0xb,
    0xf3, 0x0, 0xc, 0xf1, 0x32, 0x0, 0xdf, 0xff,
    0xfe, 0x80, 0x2, 0x10, 0x0, 0xc, 0xf1, 0x0,
    0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0
};


/*---------------------
 *  GLYPH DESCRIPTION
 *--------------------*/

static const lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = {
    {.bitmap_index = 0, .adv_w = 0, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0} /* id = 0 reserved */,
    {.bitmap_index = 0, .adv_w = 207, .box_w = 11, .box_h = 11, .ofs_x = 1, .ofs_y = 4},
    {.bitmap_index = 61, .adv_w = 151, .box_w = 7, .box_h = 17, .ofs_x = 0, .ofs_y = 0},
    {.bitmap_index = 121, .adv_w = 352, .box_w = 20, .box_h = 21, .ofs_x = 0, .ofs_y = -2},
    {.bitmap_index = 331, .adv_w = 352, .box_w = 22, .box_h = 21, .ofs_x = 0, .ofs_y = -2}
};

/*---------------------
 *  CHARACTER MAPPING
 *--------------------*/

static const uint16_t unicode_list_0[] = {
    0x0, 0x6, 0x5274, 0x5f8c
};

/*Collect the unicode lists and glyph_id offsets*/
static const lv_font_fmt_txt_cmap_t cmaps[] =
{
    {
        .range_start = 43, .range_length = 24461, .glyph_id_start = 1,
        .unicode_list = unicode_list_0, .glyph_id_ofs_list = NULL, .list_length = 4, .type = LV_FONT_FMT_TXT_CMAP_SPARSE_TINY
    }
};



/*--------------------
 *  ALL CUSTOM DATA
 *--------------------*/

#if LV_VERSION_CHECK(8, 0, 0)
/*Store all the custom data of the font*/
static  lv_font_fmt_txt_glyph_cache_t cache;
static const lv_font_fmt_txt_dsc_t font_dsc = {
#else
static lv_font_fmt_txt_dsc_t font_dsc = {
#endif
    .glyph_bitmap = glyph_bitmap,
    .glyph_dsc = glyph_dsc,
    .cmaps = cmaps,
    .kern_dsc = NULL,
    .kern_scale = 0,
    .cmap_num = 1,
    .bpp = 4,
    .kern_classes = 0,
    .bitmap_format = 0,
#if LV_VERSION_CHECK(8, 0, 0)
    .cache = &cache
#endif
};


/*-----------------
 *  PUBLIC FONT
 *----------------*/

/*Initialize a public general font descriptor*/
#if LV_VERSION_CHECK(8, 0, 0)
const lv_font_t muyu_app_font_22 = {
#else
lv_font_t muyu_app_font_22 = {
#endif
    .get_glyph_dsc = lv_font_get_glyph_dsc_fmt_txt,    /*Function pointer to get glyph's data*/
    .get_glyph_bitmap = lv_font_get_bitmap_fmt_txt,    /*Function pointer to get glyph's bitmap*/
    .line_height = 21,          /*The maximum line height required by the font*/
    .base_line = 2,             /*Baseline measured from the bottom of the line*/
#if !(LVGL_VERSION_MAJOR == 6 && LVGL_VERSION_MINOR == 0)
    .subpx = LV_FONT_SUBPX_NONE,
#endif
#if LV_VERSION_CHECK(7, 4, 0) || LVGL_VERSION_MAJOR >= 8
    .underline_position = -2,
    .underline_thickness = 1,
#endif
    .dsc = &font_dsc           /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
};



#endif /*#if MUYU_APP_FONT_22*/

